import 'package:flutter/material.dart';
import 'package:flutter_pro/routes/center.dart';
import 'package:flutter_pro/routes/news_page.dart';
import 'package:get/get.dart';
import 'base/base_tabbar.dart';
import 'common/language.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      debugShowCheckedModeBanner: false,
      translations: Language(),
      locale: Get.deviceLocale,
      fallbackLocale: const Locale('en', 'US'),
      theme: ThemeData(
        useMaterial3: true,
        appBarTheme: const AppBarTheme(
          scrolledUnderElevation: 0.0,
        ),
      ),
      getPages: [
        GetPage(name: "/centerPage", page: () => const CenterPageWidget()),
        GetPage(name: "/newsPage", page: () => const NewsPage())
      ],
      home: const BaseTabbarWidget(),
    );
  }
}
